﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AppraisePage.aspx.cs" Inherits="Basic4Net.OAWeb.Module_Base.AppraisePage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../App_Themes/ui-lightness/main.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../Scripts/jquery-1.4.1.js"></script>
    <script type="text/javascript" src="../Scripts/common.js"></script>
    <script type="text/javascript" src="../Scripts/Util.js"></script>
    
    <script language="javascript" type="text/javascript">
        function TypeAdd() {
            var txt = document.getElementById("txt_TypeName");
            var txtApp = document.getElementById("txt_TypeNameAppraise");
            if (txt.value.Trim().length > 0 && txtApp.value.Trim().length > 0) {
                var btn = document.getElementById("btnBind");
                btn.click();
                document.getElementById("txt_TypeName").value = "";
                document.getElementById("txt_TypeNameAppraise").value = "";
            }
            else {
                showMassgeBox("提示", "输入项不能为空!", 1);
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="mainWarp">
        <div class="pageBody">
        <div>
        <table style="width: 100%;">
            <tr>
                <td colspan="4" style="height:10px">
                </td>
            </tr>
            <tr>
                <td style="width:520px">
                    <table>
                        <tr>
                            <td style="width:120px">分类名称：</td>
                            <td style="width:100px"> <asp:TextBox ID="txt_TypeName" runat="server" ></asp:TextBox></td>
                            <td style="width:120px">奖金数额：</td>
                            <td style="width:100px"> <asp:TextBox ID="txt_TypeNameAppraise" runat="server" ></asp:TextBox></td>
                            <td style="width:80px"> <input id="btn_Commit" type="button" onclick="TypeAdd()" class="commonBut" value="新建" /></td>
                        </tr>
                    </table>
                </td>
                <td style="text-align:left">

                </td>
                <td ></td>
                <td ></td>
            </tr>
            <tr>
                <td colspan="4" style="height:10px">
                </td>
            </tr>
            <tr>
                <td colspan="4" align="left">
                    
                <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
                </asp:ScriptManager>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                               <asp:Repeater ID="rpt_Appraise" runat="server" 
                                OnItemCommand="rpt_Appraise_OnItemCommand">
                                <HeaderTemplate>
                                <table id="settingTable" style="width:60%" class="useList1" border="0" cellpadding="0" cellspacing="1">
                                    <tr  class="tableTitle">
                                        <th>
                                            分类名称
                                        </th>
                                        <th>
                                            奖金数额
                                        </th>
                                        <th>
                                        </th>
                                    </tr>
                                </HeaderTemplate>
                            <ItemTemplate>
                            <tr >
                                <td>
                                    <asp:TextBox ID="txt_Name" Width="200px" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"AppraiseName") %>'></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_Appraise" Width="200px" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Appraise") %>'></asp:TextBox>
                                </td>
                                <td>
                                    <asp:Button ID="btn_Change" runat="server" CommandName="Change" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"RID") %>' Text="修改" />
                                    <asp:Button ID="btn_Del" runat="server" CommandName="Del" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"RID") %>' Text="删除" />
                                </td>
                            </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                </table>
                            </FooterTemplate>
                            </asp:Repeater>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnBind" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
                    
                </td>
            </tr>

        </table>
    </div>
          <div style="display: none;">
                <asp:Button ID="btnBind" runat="server" OnClick="btnBind_Click" Text="btnBind" />
          </div>
    </div>
    </div>
    </form>
</body>
</html>
